#pragma once

#include "Property.h"
#include "DLL.h"
#include <MyFC/StringContainer.h>

namespace My {

class RowPropertyControl : public StringContainer {
public:
	RowPropertyControl(const PropertyMap &, const EditableList &);
	~RowPropertyControl();
};

// PropertyString is much like PropertyGroup except for it aligns
// its childs in a atring and occupies only a line in a PropertyEditor.
// In the code PropertyString and PropertyGroup may be used interchangeably.
class DLL_API PropertyString : 
	public PropertyBase, 
	public PropertyMap
{
public:
	PropertyString(const ResourceString & description) : 
		m_Hint(description)
		{ }
public:
	virtual bool Accept(const EditableObject &) const;
	virtual String GetHint(const EditableList &) const
		{ return m_Hint; }
	/// true if all children are read-only
	virtual bool ReadOnly(const EditableList &) const;
	/// true if at least one child is visible
	virtual bool Visible(const EditableList &) const;
	virtual Widget * CreateControl(const EditableList &);
	virtual void FreeControl(Widget *);
private:
	ResourceString	m_Hint;
};

} // My